// pages/mobileplay/moileplay.js
Page({

    /**
     * 页面的初始数据
     */
    data: {
        object:{},
        arrlist: [{
            id: 1,
            content: "购物车",
        },
        {
            id: 2,
            content: "确认订单",
        },
        {
            id: 3,
            content: "支付",
        },
        {
            id: 4,
            content: "完成",
        },
    ],
    lists:[
        "全部",
        "待付款",
        "已付款",
        "待收货",
        "待评价",
    ],
    eleindex: 0,
    goodslist:[],
    gouxuanlist:[],
    weifulist:[],

    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad: function (options) {

    },
    changeIndex(options) {
        let id = options.target.dataset.index;
        console.log(123);
        this.setData({
            eleindex: id,
        })
    },

    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady: function () {

    },

    /**
     * 生命周期函数--监听页面显示
     */
    onShow: function () {
        let  goods=wx.getStorageSync("goodsplay");
        let arr= wx.getStorageSync('GoodsCarList');
        this.setData({
          goodslist:arr,
         
        })
        console.log(this.data. goodslist);
        console.log(arr);
        this.setData({
            object:goods,
        })
        let gouxuan=wx.getStorageSync('goodsgouxuan');
        let weifu=wx.getStorageSync('goodsweifu');
        this.setData({
            gouxuanlist:gouxuan,
            weifulist:weifu,
        })


    },

    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide: function () {
        wx.setStorageSync('GoodsCarList',this.data.goodslist);

    },

    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload: function () {

    },

    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh: function () {

    },

    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom: function () {

    },

    /**
     * 用户点击右上角分享
     */
    onShareAppMessage: function () {

    }
})